from aiohttp import web
from collections.abc import Callable
import functools
import common
import json

__all__=(
    "OK",
    "FAILED"
)

_ok = {"msg":"OK"}
_failed = {"msg":"FAILED"}

def OK(encrypt:Callable=lambda x:x):
    # return web.Response(body=encrypt(ans))
    # return web.json_response(ans)
    return web.json_response(_ok)


def FAILED(encrypt:Callable=lambda x:x):
    # ans = "FAILED"
    # return web.Response(body=encrypt(ans))
    # return web.json_response(ans)
    return web.json_response(_failed)
